package com.turing.post.selfwebservice.util;

import java.math.BigInteger;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;

/**
 * 注册用户关联卡数据访问接口
 * 
 * @author 李治
 * 
 */
@Remote
@Local
public interface CardHolderUserLinkDao {
	/**
	 * 根据注册用户Id获取注册用户关联卡列表
	 * 
	 * @param cardHolderUserId
	 *            注册用户ID
	 * @return 注册用户关联卡列表
	 */
	public List<CardHolderUserLink> getCardHolderUserLinksByCardHolderUserId(
			BigInteger cardHolderUserId);

	/**
	 * 根据注册用户关联卡ID查询关联卡信息
	 * 
	 * @param cardHolderUserLink
	 * @return
	 */
	public CardHolderUserLink getCardHolderUserLinkById(
			CardHolderUserLink cardHolderUserLink);

	/**
	 * 添加关联卡
	 * 
	 * @param cardHolderUserLink
	 * @throws PCPSApplicationException
	 */
	public void insertCardHolderUserLink(CardHolderUserLink cardHolderUserLink)
			throws PCPSApplicationException;

	/**
	 * 检查卡是否已被关联
	 * 
	 * @param cardNo
	 * @return true表示已关联false表示未关联
	 */
	public boolean checkCardLinked(String cardNo);

	/**
	 * 取消持卡用户卡关联
	 * 
	 * @param cardHolderUserLink
	 * @throws PCPSApplicationException
	 */
	public void deleteCardHolderUserLink(CardHolderUserLink cardHolderUserLink)
			throws PCPSApplicationException;
}
